/******************************************************************************************
 * Import
 ******************************************************************************************/

// module
import React, {Component} from 'react';
import {View} from 'react-native';

// project
import {
    Text,  ItemX, Hand, Between, TouchOpacity, Footer
} from '../../../library'
import { hash } from 'rsvp';

/******************************************************************************************
 * Export Class
 ******************************************************************************************/

export default class InfoBottom extends Component {

    /*------------------------------------------------------------------------------------
	 * 初始化
	 *-----------------------------------------------------------------------------------*/
	constructor(props) {
        super(props);

        /**
         * state
         */
        this.state = {

        };
    }

    /*------------------------------------------------------------------------------------
	 * 自定义方法
	 *-----------------------------------------------------------------------------------*/

	/*------------------------------------------------------------------------------------
	 * 渲染
	 *-----------------------------------------------------------------------------------*/
	render() {

        const iscollect = this.props.iscollect?true:false;

        const collectPress = this.props.collectPress?this.props.collectPress:{};

        const sharePress = this.props.collectPress?this.props.collectPress:{};

        // 渲染
		return (

                <Footer>
            
                    <ItemX  f="1" bg="white" px="10">
                        <Between>
                            <TouchOpacity f="1" onPress={
                                {collectPress}
                            }>
                                <Hand f="1" h="45"  y="center" x="center">

                                    {iscollect?
                                    <ItemX x="center" y="center">
                                        <Hand>
                                            <Text size="5">收藏icon</Text>
                                        </Hand>
                                        <Text ml="2" size="16">收藏</Text>
                                    </ItemX> 
                                    :
                                    <ItemX x="center" y="center">
                                        <Hand>
                                            <Text size="5">未收藏icon</Text>
                                        </Hand>
                                        <Text ml="2" size="16">未收藏</Text>
                                    </ItemX> 
                                    }

                                </Hand>
                            </TouchOpacity>



                            <Hand f="0.1" y="center" h="45" x="center" y="center">
                                <Hand w="1" h="20" bg="#eee"></Hand>
                            </Hand>


                            <TouchOpacity f="1" onPress={
                                {sharePress}
                            }>

                                <Hand f="1" y="center" h="45" x="center">
                                    <Hand>
                                        <Text size="5" ml="2">转发icon</Text>
                                    </Hand>
                                    <Text ml="2" size="16">转发</Text>
                                </Hand>
                            </TouchOpacity>



                        </Between>
                        
                    </ItemX>



                </Footer>




		);
	}
}
